package com.gene.utils;

import javax.servlet.http.Cookie;

/**
 * Created by lenovo on 2018/1/15.
 */
public class CookieUtils {
    public static Cookie findCookie(Cookie[] cookies,String name){
        if(cookies == null){
            return null;
        }else{
            for(Cookie cookie:cookies){
                if(name.equals(cookie.getName())){
                    return cookie;
                }
            }

            return null;
        }
    }
}
